package choux_tuxing;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/13 8:23
 * @description:三角形：继承抽象类
 * 必须要重写他的方法
 */
public  class Triangle  extends  Shape{

  double a;
  double b;

  Triangle(){}
  public Triangle(double a, double b) {
    this.a = a;
    this.b = b;
  }

  @Override
  public double area() {
    return (a*b)/2;
  }

  @Override
  public String getName() {
    return "三角形";
  }



}
